<template>
  <div class="header">
    <h1>我是Header</h1>
    <p>Count的值是{{this.$store.state.count}}</p>
  </div>
</template>

<script>
export default {
  name:"Header",
  mounted() {
    //这里打印看到在实例上有$store,里面就有state,state里面就是我们要的数据count
    
    console.log(this)
  },
}
</script>


<style scoped>
.header {
  margin: 30px;
  background: yellowgreen;
}
</style>